home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / glibc108.zip / glibc108 / sysdeps / unix / sysv / sco3.2.4 / direct.h < prev    next >
C/C++ Source or Header  |  1993-05-20  |  604b  |  23 lines

  1. #ifndef    MAXNAMLEN
  2. #define    MAXNAMLEN    512
  3. #endif
  4. #define DIRBUF            1048    /* minimum buffer size for call to getdents */
  5.  
  6. struct direct
  7.   {
  8.     unsigned short int d_fileno;
  9.     short int d_pad;
  10.     long int d_off;
  11.     unsigned short int d_reclen;
  12.     char d_name[1];        /* Actually longer. */
  13.   };
  14.  
  15. #include <stddef.h>
  16.  
  17. /* We calculate the length of the name by taking the length of the whole
  18.    `struct direct' record, subtracting the size of everything before the
  19.    name, and subtracting one for the terminating null.  */
  20.  
  21. #define D_NAMLEN(d) \
  22.   ((d)->d_reclen - offsetof (struct direct, d_name) - 1)
  23.